package com.zpark.entity.patients;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 中医辨证记录表
 * @TableName tcm_diagnosis_records
 */
@TableName(value ="tcm_diagnosis_records")
@Data
public class TcmDiagnosisRecords implements Serializable {
    /**
     * 记录ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 患者ID
     */
    @TableField(value = "patient_id")
    private Long patientId;

    /**
     * 就诊日期
     */
    @TableField(value = "date")
    private Date date;

    /**
     * 主诉
     */
    @TableField(value = "chief_complaint")
    private String chiefComplaint;

    /**
     * 中医证型
     */
    @TableField(value = "syndrome_type")
    private String syndromeType;

    /**
     * 望诊
     */
    @TableField(value = "inspection")
    private String inspection;

    /**
     * 闻诊
     */
    @TableField(value = "listening")
    private String listening;

    /**
     * 问诊
     */
    @TableField(value = "inquiry")
    private String inquiry;

    /**
     * 切诊
     */
    @TableField(value = "palpation")
    private String palpation;

    /**
     * 舌象
     */
    @TableField(value = "tongue")
    private String tongue;

    /**
     * 脉象
     */
    @TableField(value = "pulse")
    private String pulse;

    /**
     * 治疗方案
     */
    @TableField(value = "treatment")
    private Object treatment;

    /**
     * 创建时间
     */
    @TableField(value = "created_at")
    private Date createdAt;

    /**
     * 更新时间
     */
    @TableField(value = "updated_at")
    private Date updatedAt;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TcmDiagnosisRecords other = (TcmDiagnosisRecords) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getPatientId() == null ? other.getPatientId() == null : this.getPatientId().equals(other.getPatientId()))
            && (this.getDate() == null ? other.getDate() == null : this.getDate().equals(other.getDate()))
            && (this.getChiefComplaint() == null ? other.getChiefComplaint() == null : this.getChiefComplaint().equals(other.getChiefComplaint()))
            && (this.getSyndromeType() == null ? other.getSyndromeType() == null : this.getSyndromeType().equals(other.getSyndromeType()))
            && (this.getInspection() == null ? other.getInspection() == null : this.getInspection().equals(other.getInspection()))
            && (this.getListening() == null ? other.getListening() == null : this.getListening().equals(other.getListening()))
            && (this.getInquiry() == null ? other.getInquiry() == null : this.getInquiry().equals(other.getInquiry()))
            && (this.getPalpation() == null ? other.getPalpation() == null : this.getPalpation().equals(other.getPalpation()))
            && (this.getTongue() == null ? other.getTongue() == null : this.getTongue().equals(other.getTongue()))
            && (this.getPulse() == null ? other.getPulse() == null : this.getPulse().equals(other.getPulse()))
            && (this.getTreatment() == null ? other.getTreatment() == null : this.getTreatment().equals(other.getTreatment()))
            && (this.getCreatedAt() == null ? other.getCreatedAt() == null : this.getCreatedAt().equals(other.getCreatedAt()))
            && (this.getUpdatedAt() == null ? other.getUpdatedAt() == null : this.getUpdatedAt().equals(other.getUpdatedAt()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPatientId() == null) ? 0 : getPatientId().hashCode());
        result = prime * result + ((getDate() == null) ? 0 : getDate().hashCode());
        result = prime * result + ((getChiefComplaint() == null) ? 0 : getChiefComplaint().hashCode());
        result = prime * result + ((getSyndromeType() == null) ? 0 : getSyndromeType().hashCode());
        result = prime * result + ((getInspection() == null) ? 0 : getInspection().hashCode());
        result = prime * result + ((getListening() == null) ? 0 : getListening().hashCode());
        result = prime * result + ((getInquiry() == null) ? 0 : getInquiry().hashCode());
        result = prime * result + ((getPalpation() == null) ? 0 : getPalpation().hashCode());
        result = prime * result + ((getTongue() == null) ? 0 : getTongue().hashCode());
        result = prime * result + ((getPulse() == null) ? 0 : getPulse().hashCode());
        result = prime * result + ((getTreatment() == null) ? 0 : getTreatment().hashCode());
        result = prime * result + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
        result = prime * result + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", patientId=").append(patientId);
        sb.append(", date=").append(date);
        sb.append(", chiefComplaint=").append(chiefComplaint);
        sb.append(", syndromeType=").append(syndromeType);
        sb.append(", inspection=").append(inspection);
        sb.append(", listening=").append(listening);
        sb.append(", inquiry=").append(inquiry);
        sb.append(", palpation=").append(palpation);
        sb.append(", tongue=").append(tongue);
        sb.append(", pulse=").append(pulse);
        sb.append(", treatment=").append(treatment);
        sb.append(", createdAt=").append(createdAt);
        sb.append(", updatedAt=").append(updatedAt);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}